package com.xingkeduo.model.vo;
import com.xingkeduo.model.po.TStaffAttendance;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
public class CmsStaffAttendanceVo {

    /**
     *排版ID
     */
    private Integer id;
    /**
     *店铺名称
     */
    private String storeName;
    /**
     *排版日期
     */
    private String date;
    /**
     *发型师ID
     */
    private Long staffId;
    /**
     *发型师真实姓名
     */
    private String staffName;
    /**
     *发型师艺名
     */
    private String staffNickName;
    /**
     *排版状态
     */
    private Integer workStatus;
    /**
     *上班时间
     */
    private String startTime;
    /**
     *下班时间
     */
    private String endTime;
    /**
     *排版人
     */
    private Long creator;
    /**
     *
     */
    private String creatorName;
    /**
     *排班创建时间
     */
    private String createTime;
    /**
     *排版最后更新时间
     */
    private String modifyTime;
    /**
     *考勤状态
     */
    private Byte type;
    /**
     *最早上班时间
     */

    /**
     *最晚下班时间
     */

    /**
     *当日库存
     */
    private List<CmsStaffStockVo> cmsStaffStockVoList;

    /**
     *当日打卡记录
     */
    private List<CmsStaffClockInVo> cmsStaffClockInVoList;

    public CmsStaffAttendanceVo(TStaffAttendance tStaffAttendance) {
        SimpleDateFormat simdfDate = new SimpleDateFormat("yyyy-MM-dd");
        SimpleDateFormat simdfDateYmdHms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        SimpleDateFormat simdfTimeHm = new SimpleDateFormat("HH:mm");
//
        this.id = tStaffAttendance.getId() == null ? null : tStaffAttendance.getId();
        this.storeName = tStaffAttendance.getStoreName();
        this.date = simdfDate.format(tStaffAttendance.getDate());
        this.staffId = tStaffAttendance.getStaffId();
        this.staffName = tStaffAttendance.getStaffName();
        this.workStatus = tStaffAttendance.getWorkStatus() == null ? null: tStaffAttendance.getWorkStatus();
        this.startTime = tStaffAttendance.getStartTime() == null ? null:simdfDate.format(tStaffAttendance.getDate())+" "+simdfTimeHm.format(tStaffAttendance.getStartTime());
        this.endTime = tStaffAttendance.getEndTime() == null ? null :simdfDate.format(tStaffAttendance.getDate())+" "+simdfTimeHm.format(tStaffAttendance.getEndTime());
        this.creator = tStaffAttendance.getCreator() == null ? null : tStaffAttendance.getCreator();
        this.createTime = simdfDateYmdHms.format(tStaffAttendance.getCreateTime());
        this.modifyTime = tStaffAttendance.getModifyTime() == null ? null:simdfDateYmdHms.format(tStaffAttendance.getModifyTime());
        this.type = tStaffAttendance.getType() == null ? null : tStaffAttendance.getType();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Long getStaffId() {
        return staffId;
    }

    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public String getStaffNickName() {
        return staffNickName;
    }

    public void setStaffNickName(String staffNickName) {
        this.staffNickName = staffNickName;
    }

    public Integer getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(Integer workStatus) {
        this.workStatus = workStatus;
    }


    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }


    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public List<CmsStaffStockVo> getCmsStaffStockVoList() {
        return cmsStaffStockVoList;
    }

    public void setCmsStaffStockVoList(List<CmsStaffStockVo> cmsStaffStockVoList) {
        this.cmsStaffStockVoList = cmsStaffStockVoList;
    }

    public List<CmsStaffClockInVo> getCmsStaffClockInVoList() {
        return cmsStaffClockInVoList;
    }

    public void setCmsStaffClockInVoList(List<CmsStaffClockInVo> cmsStaffClockInVoList) {
        this.cmsStaffClockInVoList = cmsStaffClockInVoList;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }
}
